<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
<meta content="yes" name="apple-mobile-web-app-capable" />
<meta content="black" name="apple-mobile-web-app-status-bar-style" />
<meta content="telephone=no" name="format-detection" />
	<title></title>
	<script type="text/javascript" src="/js/lib/require.js"></script>
    <script type="text/javascript" src="/js/require.config.js"></script>
    <script type="text/javascript">
    require(["core"], function() {
    	require(["./js/pages/goods-details"],function (argument) {
        	window.removeLoader();       	
    	});
    });
    </script>
    
</head>
<body>
    <div style="display:none" id="jSouperApp">
        <xmp>
        {{#include "./pages/mobile/default/top.html"}}
        {{#include "./pages/mobile/default/nav.html"}}


        <div class="goods-details">
            <div class="item">
                <div class="pagetitle">{{goods_detail.goods_name}}</div>
            </div>

            <div class="item">
                <div class="img">
                    {{#> "m-goods-main-img","goods_detail"}}
                </div>
            </div>

            <div class="item">
                <div class="price">售价：{{goods_detail.price_toFixed_2+"/"+goods_detail.unit}}</div>
                <div class="num">库存：{{goods_detail.num}}</div>
            </div>

            <div class="item">
                <div class="money">运费：{{goods_detail.fare_toFixed_2}}</div>
                <div class="buy">
                
                    <input class="buynum" min=0 max="{{goods_detail.num}}" value="1" bind-input="{{'$Cache.goods_details.buy_number'}}"></input>

                    <a href="./m.cart.html?goods_id={{goods_detail._id}}&&num={{$Cache.goods_details.buy_number}}&&rcid={{$Cache.recommender_id}}"><input type="button" value="添加购物车" name="add_cart" id="add_cart" class="add_cart" /></a>
                </div>
            </div>
        </div>




                
        <div class="comments">
            <div class="title">商品评论</div>
            {{#if !goods_detail.evaluations.length}}
            <p>暂无购买评论</p>
            {{/if}}
            <table>
            {{#each goods_detail.evaluations}}
            <tr>
                <td class="first">
                    <span class="attribute">{{star_num}}</span>
                </td>
                <td class="second">{{comment.content}}</td>
                <td class="third">
                    {{#if comment.commenter_info.name}}
                        买家：<span>{{comment.commenter_info.name}}</span>
                    {{#else}}
                        匿名买家
                    {{/if}}
                </td>
            </tr>
            {{/each}}
                
            </table>
            
            {{#if $Cache.eval.can_evaluation_able}}
            <hr>
            <div class="evaluation">
                <inputNumber max="10" min="0" bind-input="{{'$Cache.eval.star_num'}}" value="5"></inputNumber>
                <label>
                    <input type="checkbox" bind-input="{{'$Cache.eval.isAny'}}" />匿名评价
                </label>
                <textarea bind-input="{{'$Cache.eval.content'}}"></textarea>
                <button event-click="{{'$Event.eval.submitEval'}}">提交评价</button>
            </div>
            {{/if}}
        </div>




        {{#include "pages/mobile/default/bottom.html"}}
        </xmp>

    </div>

</body>
</html>